import unittest
from distutils.command.config import config
import config
import requests
from api.GetProcessingBattleListForTeacher import GetProcessingBattleListForTeacher



class GetBattleList(unittest.TestCase):
    def setUp(self):
        self.session = requests.session()

    def tearDown(self):
        self.session.close()


    def test01_getBattleList(self):



        data = {
            "service_name": "nkomarket.BattleDashboardProvider.GetProcessingBattleListForTeacher",
            "param": {
                "tchType": 1
            }
        }

        getbattle = GetProcessingBattleListForTeacher()
        response = getbattle.getBattle_list(self.session,data,config.TOKEN_RESULT[0].get("xhx_token"))
        self.assertEqual("ok",response.json().get("msg"))
        print(response.json())